<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>load_method</title>
    <script src="${pageContext.request.contextPath }/statics/js/jquery-3.5.1.js"></script>
    <style>
        *{margin: 0;padding: 0}
        html, body{height: 100%}
          #dd{width: 100%;height:15%}
        #nav{float: left;width:30%;height:100%}
        #con{float: right;width: 70%;height:100%}
    </style>
    <script>
        $(document).ready(function(){
            //页面加载的时候，内容框默认显示 a.html
            $('#con').load('index.jsp');
            //单击 a 链接，加载 a.html
            $("#a1").click(function(){
                $('#con').load('toLogin');
            });
            //单击 b 链接，加载 b.html
            $("#a2").click(function(){
                $('#con').load('./b.html');
            });
        })
    </script>
</head>
<body>
<div id="dd">asdfsadf</div>
<ul id="nav">
    <li><a href="#" id="a1">show a</a></li>
    <li><a href="#" id="a2">show b</a></li>
</ul>
<div id="con"></div>
</body>
</html>